const requireComponent = require.context('./',true,/\.vue$/)
const install = function(Vue){
  if(install.installed) return
  requireComponent.keys().forEach(fileName=>{
    const config = requireComponent(fileName)
    const componentName = config.default.name
    console.log(config)
    Vue.component(componentName,config.default||config)
  })
}
export default {install}
